<?php defined('SYSPATH') or die('No direct script access.') ;
/**
 * 基础控制器
 */
abstract class Controller_Base extends Controller
{

    /**
     * @var Manager
     */
    public $auth = NULL;

    /**
     * @var Session_NameSpace
     */
    public $session = NULL;

    /**
     * Loads the [View] object.
     */
    public function before()
    {
        parent::before();

        $this->auth = Auth::instance();
        $this->session = Session_NameSpace::factory('www');

        // Set the global view variables
        View::set_global('auth', $this->auth);
        View::set_global('controller', $this->request->controller());
        View::set_global('action', $this->request->action());

        // Set the message helper view directory
        Helper_Message::$directory = '/';
    }

} // End Controller_Admin_Base